using System;
using System.IO;
using Tailord;
using System.Drawing;

namespace ConfExpert.Utility
{
    public class AppSession
    {
        static DevTeam.DataManager dataManager = null;
        static MainForm mainForm;
        static User userInfo;
        
        public AppSession(string AppName)
        {
            TempDirectory = Directory.CreateDirectory(Path.Combine(Path.GetTempPath(), AppName)).FullName;
            DataDirectory = Directory.CreateDirectory(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), AppName)).FullName;
            
            repositoryManager = new RepositoryManager();            
        }

        public static Color ColorToplam = Color.LightYellow;
        public static Color ColorZorunlu = Color.LimeGreen;

        public static DateTime LaunchingTime;

        public static bool Notifications = true;
        public static string ImagesFileName;

        private static AppSettings settings = null;
        public static AppSettings Settings
        {
            get { return settings; }
            set { settings = value; }
        }
 

        private static RepositoryManager repositoryManager;
        public static RepositoryManager RepositoryManager
        {
            get { return AppSession.repositoryManager; }
            set { AppSession.repositoryManager = value; }
        }

        public static MainForm MainForm
        {
            get { return AppSession.mainForm; }
            set { AppSession.mainForm = value; }
        }

      
        static public DevTeam.DataManager DataManager
        {
            get { return dataManager; }
            set { dataManager = value; }
        }

        public static User UserInfo
        {
            get { return userInfo; }
            set { userInfo = value; }
        }

        private static string version = null;
        public static string Version
        {
            get { return version; }
            set { version = value; }
        }

        private static string db = null;
        public static string DatabaseName
        {
            get { return db; }
            set { db = value; }
        }

        private static string tempDirectory;
        public static string TempDirectory
        {
            get { return AppSession.tempDirectory; }
            set { AppSession.tempDirectory = value; }
        }

        private static string dataDirectory;
        public static string DataDirectory
        {
            get { return AppSession.dataDirectory; }
            set { AppSession.dataDirectory = value; }
        }
 
    }
}
